#!/bin/sh
case "$1" in
	start)
		APP="/dev/mtdblock"`cat /proc/mtd | grep -i user | cut -c4`
		echo "APP bolck = $APP"
		if [ "$APP" != "/dev/mtdblock" ]; then
			if [ -d /app ]; then
				mount $APP /app
				if [ -x /app/out.elf ]; then
					echo "mount success $APP cramfs"
				fi
			fi
		fi
		;;
	stop)
		if [ -d /app ]; then
			umount /app
		fi
		#umount /home/gx
		;;
	restart|reload)
		;;
	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
esac

